<style>
<!--
.account-bind div {
	width:50px;
	height:50px;
	float:left;
	padding:5px;
}
-->
</style>
<?php 
extract($data);
//print_r($data);
?>

<?php if(!empty($binds)):?>
<fieldset>
<legend>您已经绑定了新浪微博</legend>
<div class="account-bind">
	<?php foreach($binds as $p):
	
		if(($key = array_search ($p->pid,$unbindIds))!== false)
			unset($unbindIds[$key]);
	?>
	<div class='icon'> <?php echo CHtml::image(Yii::app()->baseUrl."/images/icon/{$p->pid}_48x48.png")?></div>
	<?php endforeach;?>
</div>
</fieldset>
<?php endif;?>

<?php if(!empty($unbindIds)):?>
<fieldset>
<legend>您还未绑定的微博</legend>
<div class="account-bind">
	<?php foreach($unbindIds as $pid):?>
	<div class='icon'> <?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl."/images/icon/{$pid}_48x48.png"),
											array('setting/bindAccount/','pid'=>$pid),
											array('target'=>'_blank'))?></div>
	<?php endforeach;?>
</div>
</fieldset>
<?php endif;?>